package com.example.activity_four_module;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

public class Page1Activity extends Activity {
    Button myButton;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_page1);
        myButton = (Button)findViewById(R.id.btn1);
        myButton.setOnClickListener(v->{
            Intent intent = new Intent(Page1Activity.this, Page2Activity.class);
            startActivity(intent);
        });
        Log.v("Page","Activity_page1任务栈号为"+this.getTaskId());
    }
    @Override
    protected void onStart() {
        Log.v("Page","Activity_page1开始运行");
        super.onStart();
    }

    @Override
    protected void onDestroy() {
        Log.v("Page","Activity_page1销毁");
        super.onDestroy();
    }
}
